package fr.insta.reverse.uml.java.projectParser;

import java.util.ArrayList;

import org.apache.bcel.classfile.ConstantClass;
import org.apache.bcel.classfile.ConstantPool;
import org.apache.bcel.classfile.EmptyVisitor;
import org.apache.bcel.classfile.JavaClass;

public class DependencyEmitter extends EmptyVisitor
{

	private JavaClass javaClass;
	private String dependencies;
	private ArrayList<String> listDepencencies = new ArrayList<String>();

	public DependencyEmitter(JavaClass javaClass)
	{
		this.javaClass = javaClass;
	}

	@Override
	public void visitConstantClass(ConstantClass obj)
	{
		ConstantPool cp = javaClass.getConstantPool();
		this.dependencies = obj.getBytes(cp);
		listDepencencies.add(dependencies);
	}

	public ArrayList<String> getListDepencencies()
	{
		return listDepencencies;
	}

}